// 路由生成器
const generateRouter = (routers) => {
  return routers.map((router) => {
    const name = router[0]
    const path = router[1]
    return {
      path: `${name}`,
      name: `router.${name}`,
      component: () => import (`@/views/${path}/${name}`)
    }
  })
}

export default generateRouter